<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>铿锵五人组</title>
<style type="text/css">
body {
	background-image:url(<%=request.getContextPath()%>/img/b13.jpg);
}
.rg {
	text-align:center;
	background-color:#FFF;
	width:960px;
	margin:auto;
	margin-top:110px;
}
p.cp {
	margin-top:auto;
}
</style>
<script language="javaScript">
 function checkData(){
 var password=document.getElementById("password").value;
 var cfmpassword=document.getElementById("cfmpassword").value;
 var username=document.getElementById("username").value;
 if(password.length<4){
	 alert("密码输入错误");
	 return false;
	 }
 if(password.length>=4&password.length<6){
 	alert("密码安全等级低");
    return false;
 }
 if(password.length>=8&password.length<8){
 	alert("密码安全等级中");
    return false;
 }
 if(password.length>=12){
 	alert("密码安全等级高");
    return false;
 }
 if(cfmpassword!=password){
	alert("密码输入不一致");
    return false;
 }
 }
 function Chinasimple() {
	  var username=document.getElementById("username").value;
           var username=username.replace(/(^\s+)|(\s+$)/g, "");
            if (!username.match(/^[\u4e00-\u9fa5]{2,4}$/)) {
                alert("只能输入2到4个汉字");
                return false;
            }
        }
</script>
</head>
<body>
<br>
<br>
<div id='msgs'>${messages}</div>
  <form action="<%=request.getContextPath()%>/register" method="post" class="rg" onSubmit="checkData()">
    <table>
      <tr height="40px">
        <h2>欢迎来到KengQiang.com</h2>
      </tr>
      <tr>
        <td><p>邮箱<span>*</span>
            <input type="text" name="email" id="r_mail">
            <span>请输入你常用的邮箱</span></p>
			<p>用户登录名<span>*</span>
            <input type="text" name="uname" id="username">
            <input class="buttons" onClick="Chinasimple()" type="button" value="用户登录名检测" name="Check">
            <span> 2-4个汉字</span></p>
          <p>  博客名<span>*</span>
            <input type="text" name="blogname" id="username">
            <input class="buttons" onClick="Chinasimple()" type="button" value="博客名检测" name="Check">
            <span> 2-4个汉字</span></p>
          <p>   密码<span>*</span>
            <input type="password" name="password" id="password">
            <span> 4-15位字符，区分大小写</span></p>
          <p>  确认密码<span>*</span>
            <input type="password" name="cfmpassword" id="cfmpassword">
            <input class="buttons" onClick="checkData()" type="button" value="密码检测" name="Check">
            <span> 请输入相同的密码</span></p>
          <p>性别<span>*</span>
            <input type="radio" name="control1" value="0" checked="checked"/>
            男
            <input type="radio" name="control1" value="1"/>
            女</p>
          <p>
            <input type="submit" value="立即注册" onClick="return Chinasimple()"/>
          </p></td>
      </tr>
      <tr height="40px"></tr>
    </table>
  </form>
  <br>
  <br>
  <br>
</div>
<p class="cp">
  <center>
    Copyright &copy 2012项目三部铿锵五人组
  </center><a href="http://www.kengqiang.com/"></a>
</p>

</body>
</html>